package be.novelfaces.component.util.js;

import java.util.LinkedHashMap;

import com.google.gson.GsonBuilder;

public class JSONBuilder {
	
	private LinkedHashMap<String, Object> attributes = new LinkedHashMap<String,Object>();
	
	public String build() {
		return new GsonBuilder().create().toJson(attributes); 
	}
	
	public JSONBuilder withProperty(String name, Object value) {
		attributes.put(name, value);
		return this;
	}

}
